﻿using BoldBrick.Web.Parameters;

namespace BoldBrick.SharePoint.CommonControls.DataObjects.Query
{
	public class ContentTypePageQueryParameters
	{
		[ParameterName("ctype")]
		public string ContentType { get; set; }

		/// <summary>
		/// Creates <see cref="ContentTypePageQueryParameters"/> instance
		/// </summary>
		/// <returns>Returns <see cref="ContentTypePageQueryParameters"/> instance with values from HttpContent.Current</returns>
		public static ContentTypePageQueryParameters GetParametersFromContext()
		{
			RequestQueryParametersProvider target = new RequestQueryParametersProvider();
			ContentTypePageQueryParameters queryParameters = target.LoadParameters<ContentTypePageQueryParameters>();
			return queryParameters;
		}
	}
}
